Count the number of array elements and returns the number of elements zero based (Array[0..x] of Type).
| LGF_CountArrayElements (FC) | ||||||||
|---|---|---|---|---|---|---|---|---|
| Variant | array | Ret_Val | DInt | |||||
| Identifier | Data type | Description |
|---|---|---|
| array | Variant | Input array to check for number of elements |
| Identifier | Data type | Description |
|---|---|---|
| Ret_Val | DInt | Number of elements in array (zero based); Returning `-1` if input variable is not type `array`; Returning `-2` if input variable is type `bool`; |
| Code / Value | Identifier / Description |
|---|---|
| -1 | RETURN_NO_ARRAY No array is present at the input `array` |
| -2 | RETURN_NO_BOOL_ARRAYS_NOT_SUPPORTED Boolean arrays not supported |
| Version & Date | Change description | |
|---|---|---|
| 1.0.0 | Siemens Industry Support | |
| 10-06-2022 | First released version | |